/*   1:    */ package com.rinsi.app.azsb.azzl.scs.scxkzqz;
/*   2:    */ 
/*   3:    */ import com.rinsi.core.CoreCache;
/*   4:    */ import com.rinsi.core.service.CoreSimpleService;
/*   5:    */ import com.rinsi.util.ListUtil;
/*   6:    */ import com.rinsi.util.MapUtil;
/*   7:    */ import java.util.List;
/*   8:    */ import java.util.Map;
/*   9:    */ import org.mybatis.spring.SqlSessionTemplate;
/*  10:    */ import org.springframework.stereotype.Service;
/*  11:    */ 
/*  12:    */ @Service
/*  13:    */ public class ScxkzQzService
/*  14:    */   extends CoreSimpleService
/*  15:    */ {
/*  16:    */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap)
/*  17:    */   {
/*  18: 21 */     Map<String, Object> params = getParams(model);
/*  19:    */     
/*  20: 23 */     Map<String, Object> config = getConfig(model);
/*  21:    */     
/*  22: 25 */     rMap.put("jjlxs", getSqlSessionTemplate().selectList("Core.getCodeList", Integer.valueOf(400002)));
/*  23:    */     
/*  24: 27 */     List<Map<String, Object>> modules = CoreCache.getCacheList(MapUtil.getString(params, "UID"), "modules");
/*  25:    */     
/*  26: 29 */     List<Map<String, Object>> sub_rights = ListUtil.subList(modules, "MODULE_NO_PRE='500005'");
/*  27:    */     
/*  28: 31 */     rMap.put("azsbxx", getSqlSessionTemplate().selectOne("azsb.get", params));
/*  29:    */     
/*  30: 33 */     rMap.put("userxx", CoreCache.getCacheMap(MapUtil.getString(params, "UID"), "user"));
/*  31:    */     
/*  32: 35 */     model.put("sub_rights", ListUtil.listToMap(sub_rights, "MODULE_TYPE"));
/*  33:    */     
/*  34: 37 */     rMap.put("organxx", CoreCache.getCacheMap(MapUtil.getString(params, "UID"), "organ"));
/*  35:    */     try
/*  36:    */     {
/*  37: 41 */       List<Map<String, Object>> datas = getSqlSessionTemplate().selectList(namespace(config) + ".list", params);
/*  38:    */       
/*  39: 43 */       rMap.put("datas", datas);
/*  40:    */       
/*  41: 45 */       rMap.put("success", Boolean.valueOf(true));
/*  42:    */     }
/*  43:    */     catch (Exception e)
/*  44:    */     {
/*  45: 49 */       rMap.put("success", Boolean.valueOf(false));
/*  46: 51 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/*  47: 53 */         rMap.put("message", e.getMessage());
/*  48:    */       } else {
/*  49: 57 */         rMap.put("message", "展示数据列表出错！请稍后重试，或联系系统管理员！");
/*  50:    */       }
/*  51: 60 */       rMap.put("ex", e.getMessage());
/*  52:    */       
/*  53: 62 */       e.printStackTrace();
/*  54:    */     }
/*  55:    */   }
/*  56:    */   
/*  57:    */   public Map<String, Object> scbxx(Map<String, Object> model)
/*  58:    */   {
/*  59: 70 */     Map<String, Object> params = getParams(model);
/*  60:    */     
/*  61: 72 */     Map<String, Object> config = getConfig(model);
/*  62:    */     
/*  63: 74 */     Map<String, Object> rMap = getRMap();
/*  64:    */     try
/*  65:    */     {
/*  66: 78 */       int scbxxNum = ((Integer)getSqlSessionTemplate().selectOne(namespace(config) + ".scbxx", params)).intValue();
/*  67: 80 */       if (scbxxNum != 0) {
/*  68: 82 */         throw new Exception("请填写所有审查表信息！");
/*  69:    */       }
/*  70: 86 */       getSqlSessionTemplate().selectOne(namespace(config) + ".qz", params);
/*  71:    */       
/*  72: 88 */       rMap.put("success", Boolean.valueOf(true));
/*  73:    */     }
/*  74:    */     catch (Exception e)
/*  75:    */     {
/*  76: 92 */       rMap.put("success", Boolean.valueOf(false));
/*  77:    */       
/*  78: 94 */       rMap.put("message", e.getMessage());
/*  79:    */       
/*  80: 96 */       rMap.put("ex", e.getMessage());
/*  81:    */       
/*  82: 98 */       e.printStackTrace();
/*  83:    */     }
/*  84:102 */     return rMap;
/*  85:    */   }
/*  86:    */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.app.azsb.azzl.scs.scxkzqz.ScxkzQzService
 * JD-Core Version:    0.7.0.1
 */